using System;
using System.Collections.Generic;
using System.Text;

namespace Basic
{
    [Serializable]
    public enum DataType
    {
      Bit,
    Int16, 
    Uint16,
    Int32,
    Uint32,
    Float
    }
    [Serializable]
    public enum VarType
    {
        COIL_STATUS_1,
        INPUT_STATUS_2,
        HOLDING_REGISTER_3,
        INPUT_REGISTER_4
    }
    [Serializable]
    public class DevVar
    {
        public string sVarName = "";
        public VarType nVarType ;//coil,input dis,output register,input register
        public string mAddr = "";
        public string mDesc = "";
        public object mValue = "";
        public object mOldValue = "";
        public string mDevice="";
        public DataType mDatatype;
        public float offset = 0;
        public float factor = 1;
        public float Counter = 0;
        public bool bWrite = false;
        public bool bWriteOperation = false;
        public object mWriteValue;
        public DateTime Datatime;
        public float statval = 0;
        public float stopval = 0;
        public string changeway="";
        public int readNum = 1;
        public bool bUsed = false;
        public DevVar()
        {
            mValue = 0;
        }

    }
}
